# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-sortedcontainers
pkgver=2.1.0
pkgrel=3
pkgdesc='Python Sorted Container Types: SortedList, SortedDict, and SortedSet.'
arch=('any')
license=('Apache')
url='http://www.grantjenks.com/docs/sortedcontainers/'
depends=('python2')
makedepends=('python2-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/grantjenks/python-sortedcontainers/archive/v$pkgver.tar.gz")
sha512sums=('1c56daea5d491dbeea9c677677a79ef5c4805325ea3d5da97005cd3b269003a99459550a793dfe65820f152c774371472ba471a7daf61c9d97b36744bafb013b')

prepare() {
  # Don't use tox
  sed -i '/tests_require/d' "python-sortedcontainers-$pkgver/setup.py"
}

build() {
  cd "python-sortedcontainers-$pkgver"

  python2 setup.py build
}

package() {
  cd "python-sortedcontainers-$pkgver"

  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

